//package org.example
//
//import org.apache.spark
//import org.apache.spark.sql.SparkSession
//
//object Scala {
//
//
//
//  def main(args: Array[String]): Unit = {
//      val spark = SparkSession
//      .builder()
//      .master("local[*]")
//    .getOrCreate()
//     val sc = spark.sparkContext

//    val first_half = {
//      sc.textFile("C:\\Users\\Administrator\\Desktop\\Employee_salary_first_half.csv")
//      val drop_first = first_half.mapPartitionsWithIndex((ix,it) => {
//          if (ix ==0) it.drop(1)
//          it
//        })
//        val split_first = drop_first.map(line => {val data =
//            line.split(",");
//          (data(1), data(6).toLong)})
//        val sort_first =split_first.sortBy(x => x._2,false)
//        sort_first.take(3).foreach(System.out.println)
//      sc.stop()


//      val sc = spark.sparkContext
//      val list1 = sc.makeRDD(List(60,77,88,99,87),1)
//      val list2 = sc.parallelize(list(66,75,87,78,92),1)
//      val list3 = sc.makeRDD(list('a','b','c','d','e'),1)
//      list3.zip(list2).foreach(println)

//      list1.foreach(println)
//      val first_half = sc.textFile("E:\\ikun1\\Employee_salary_first_half.csv")
//      val second_half = sc.textFile("E:\\ikun1\\Employee_salary_second_half.csv")
//      val drop_first = first_half.mapPartitionsWithIndex((ix,it) => {
//        if (ix ==0) it.drop(1)
//        else it
//      })
//      val drop_second = second_half.mapPartitionsWithIndex((ix, it) => {
//        if (ix == 0) it.drop(1)
//        else it
//      })
//      val split_first = drop_first.map(
//        Line => {val data = Line.split(",");(data(1),data(6).toInt)})
//      val split_second = drop_second.map(
//      Line => {val data = Line.split(",");(data(1),data(6).toInt)})
//      val filter_first=split_first.filter(x => x._2 > 200000).map(x => x._1)
//      val filter_second=split_second.filter(x => x._2 > 200000).map(x => x._1)
//      val name=filter_first.union(filter_second).distinct()
//      name.collect().foreach(println)
//      }
//}
